package test

import office._

/**
 * @author: Yardena
 * @date: Aug 16, 2009 9:23:36 AM
 */

object Test2 {
  def main(args : Array[String]) {
    val query = query_id_gt_3(OfficeObjectMapping)
    for {elem <- query(OfficeObject); columns = ~query} {
      import columns._
      println(name(elem))
    }
    for {elem <- query_id_gt_3(OfficeObjectMapping)(OfficeObject)} println (elem)
  }

  def query_id_gt_3(office: OfficeSchema) = {
    import office._
    from(employee) where ((employee.id > 3) and not(employee.manager))
  }

}
